<?php
	session_start();
	$conn = @mysql_connect("localhost","root","lks112700.");
	if(!$conn){
		die("数据库连接失败:".mysql_error());
	}
	mysql_select_db("person",$conn);
	$user_mail = $_SESSION['e_mail'];
	$db1 = 'select * from user where std_email = $user_mail';
	
	if($check = mysql_query($db1,$conn))
	{
		// $rows = mysql_num_rows($check);
		// $result = mysql_fetch_array($check);
		$std_tel_num = $_POST['std_tel_num'];
		$std_paw = $_POST['std_paw'];
		$std_wechat = $_POST['std_wct'];
		$std_name = $_POST['std_name'];
		$std_addr = $_POST['std_addr'];
		$std_email = $_POST['std_email'];
		$sql = "update user set std_tel_num='$std_tel_num',std_paw='$std_paw',std_wechat='$std_wct',std_name='$std_name',std_addr='$std_addr',std_email='$std_email' where std_email='$std_email'";
		mysql_query($sql,$conn);
		<script type="text/javascript">
		 alert("修改成功！");
		</script>
	}
	else
	{
		exit("错误！");
	}
?>